package com.example.startup

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import com.example.startup.manager.StartUpManager
import com.example.startup.task.Task1
import com.example.startup.task.Task2
import com.example.startup.task.Task3
import kotlinx.coroutines.launch

class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        lifecycleScope.launch {
            StartUpManager.Builder()
                .addStartUp(Task3())
                .addStartUp(Task2())
                .addStartUp(Task1())
                .builder(this@MainActivity)
                .start()
        }
    }
}